import request from '@/common/utils/request.js'

// 1查询所有预约产品
export function searchAllProduct(categoryId,pageNum,pageSize){
	return request({
		url:'/massage/product/app/searchList?categoryId='+categoryId+'&pageNum=' + pageNum + '&pageSize=' + pageSize,
		method: 'get',
	})
}
// 2.预约产品
export function appointProduct(id,count){
	return request({
		url:'/visit/appointment/product?productId=' + id + '&buycount='+ count,
		method: 'get',
	})
}
// 3 查看自己预约的产品
export function queryAppointProduct(){
	return request({
		url: '/visit/appointment/product/getListByUserId',
		method: 'get',
	})
}
// 4 产品取消预约
export function cancelProduct(id){
	return request({
		url: '/visit/appointment/product/cancel/'+id,
		method: 'post'
	})
}
// 修改产品预约情况
export function updateAppointProduct(id,count){
	return request({
		url:'/visit/appointment/update/product?productId=' + id + '&buycount='+ count,
		method:'get',
	})
}
// 6 查询产品分类
export function queryProductCategory(){
	return request({
		url:'/massage/productCategory',
		method:'get'
	})
}